﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" 
CodeBehind="Patterns.aspx.cs" Inherits="ElectronicJournal.Account.EditorAccount.Patterns" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ApplicationServices %>" 
        SelectCommand="SELECT Title, Description, FileName, Id FROM Patterns ORDER BY Title"
        InsertCommand="INSERT INTO Patterns VALUES(@Title, @Description, @FileName, NEWID())"
        DeleteCommand="DELETE FROM Patterns WHERE Id = @Id">
    <InsertParameters>
        <asp:Parameter Name="Title" Type="String" />
        <asp:Parameter Name="Description" Type="String" />
        <asp:Parameter Name="FileName" Type="String" />
    </InsertParameters>
</asp:SqlDataSource>
    <a href="Default.aspx">Меню редактора</a>
    <table>
        <tbody>
            <tr>
                <td>
                    <asp:LinkButton runat="server" Text="Скачать файл шаблона публикации" OnClick="LinkButton_Click" />
                </td>
            </tr>
            <tr>
                <td>
                    Изменить файл шаблона:
                </td>
                <td>
                    <asp:FileUpload ID="FileUpload1" runat="server" />
                </td>
                <td>
                    <asp:Button runat="server" Text="Загрузить" OnClick="Button_Click" />
                </td>
            </tr>
        </tbody>
    </table>
</asp:Content>
